package example1;
/**
 * @Author:DarknessShadow
 * @description:
 * @date 2020/5/13 10:20
 */
public class Director {
    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    public void construct() {// 编写文档
        builder.makeTitle("Greeting");        // 标题
        builder.makeString("从早上到下午");    // 字符串
        builder.makeItems(new String[]{       // 条目
                "good morning",
                "good afternoon",
        });
        builder.makeString("晚上");
        builder.makeItems(new String[]{       // 条目
                "good night",
                "good bye",
        });
        builder.close();
    }
}
